<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of AdminController
 *
 * @author mooshroom
 */
namespace Home\Controller;
class AdminController extends \Think\Controller{
  //put your code here
   protected $UserLoginModel            = null ;
    protected $StudentBaseModel          = null ;
    protected $ActivityDictionaryModel   = null ;
    protected $ActivityLinkModel         = null ;
    protected $AcademyDictionaryModel    = null ;
    protected $ProfessionDictionaryModel = null ;

    function __construct ()
    {
        parent::__construct () ;
        $this->UserLoginModel            = new \Home\Model\UserLoginModel() ;
        $this->StudentBaseModel          = new \Home\Model\StudentBaseModel() ;
        $this->ActivityDictionaryModel   = new \Home\Model\ActivityDictionaryModel() ;
        $this->ActivityLinkModel         = new \Home\Model\UserActivityLinkModel() ;
        $this->AcademyDictionaryModel    = new \Home\Model\AcademyDictionaryModel() ;
        $this->ProfessionDictionaryModel = new \Home\Model\ProfessionDictionaryModel() ;
    }
  //勤工管理人员添加励志2+4活动页面
    function addActivity ()
    {
        if ( session ( 'UID' ) )
        {
            $this->display () ;
        }
        else
        {
            $this->error ( '登录超时' ) ;
        }
    }
    //添加学生参加活动记录
    function addActivityLink ()
    {
        if ( session ( 'UID' ) )
        {
            $this->display () ;
        }
        else
        {
            $this->error ( '登录超时' ) ;
        }
    }
    //录入用户基本信息页面
    function addStudentBaseInfor ()
    {
        if ( session ( 'UID' ) )
        {
            $Academy    = $this->AcademyDictionaryModel->select () ;
            $this->assign ( 'Academy' , $Academy ) ;
            $Profession = $this->ProfessionDictionaryModel->select () ;
            $this->assign ( 'Profession' , $Profession ) ;
            $Grade      = D ( 'GradeDictionary' )->select () ;
            $this->assign ( 'Grade' , $Grade ) ;
            $Class      = D ( 'ClassDictionary' )->select () ;
            $this->assign ( 'Class' , $Class ) ;
            $this->display () ;
        }
        else
        {
            $this->error ( '登录超时' ) ;
        }
    }
    //管理员界面
    function admin ()
    {
        if ( session ( 'UID' ) )
        {
            $this->display () ;
        }
        else
        {
            $this->error ( '登录超时' ) ;
        }
    }


}
